home *** CD-ROM | disk | FTP | other *** search
/ Die Speccy' 97 / Die Speccy' 97.iso / amiga_system / the_aminet / comm / tcp / rdate.lha / rdate.doc < prev   
Text File  |  1995-10-03  |  5KB  |  111 lines

  1. #1zz
  2.  
  3.  
  4.  
  5.  
  6.  
  7.                   RDATE - Set Amiga clocks from a timeserver
  8.  
  9.      Rdate requires  that AmiTCP be running and uses the TCP protocol to access
  10.  the "time" service on a specified  machine to  get the  correct time.  It then
  11.  converts it  to your  local time  and sets  the Amiga's  software and hardware
  12.  clocks. If the hardware clock can't be found the program will print  a message
  13.  and set only the software clock. 
  14.  
  15.      In order  to perform  this small  miracle, the  program needs  to know two
  16.  things.
  17.  
  18.  1. The name of the machine which will provide you with TCP time service as per
  19.  RFC868. It  is important  to note  that the  program requires the TCP service.
  20.  Some time service machines  only provide  the UDP  service (also  described in
  21.  RFC868) but the program can't use UDP.
  22.  
  23.     The default  name used for the machine1 is "tick" which is a machine on the
  24.  U. of S. campus (and which won't be much use to you if you are off  campus. If
  25.  you have a machine in your db/hosts file whose name is tick and which provides
  26.  time service then rdate will connect  to that  machine. Otherwise  you have to
  27.  set the  environment variable TZ_TIMESERVER to the name of the server machine.
  28.  This variable must be set with the setenv command. E.G.
  29.  
  30.     setenv TZ_TIMESERVER clock.domain.org
  31.  
  32.  If you have a machine named "clock" in your db/hosts file then
  33.  
  34.     setenv TZ_TIMESERVER clock
  35.  
  36.  is sufficient.
  37.  
  38.  2. You must specify which timezone you use to set your computer clock by. This
  39.  is done by setting the environment variable TZ_CHU and can be done with either
  40.  the setenv command or the Manx "set" command.
  41.  
  42.      The environment  variable TZ  is not  used because  it does  not allow for
  43.  timezones such as that in Newfoundland which is half an hour ahead of Atlantic
  44.  Standard Time.
  45.  
  46.      The general format of the  string  that  specifies  your  timezone  in the
  47.  TZ_CHU environment variable is:
  48.  
  49.      [-]hh[:mm][D]
  50.  
  51.      This means  that the  time is  specified as a number of hours which can be
  52.  preceded by an optional minus sign  (for  EAST  of  Greenwich)  and optionally
  53.  followed by  a number  of minutes (e.g. 3:30 for Newfoundland) and all of this
  54.  can have an optional letter  after  it  to  specify  that  your  timezone uses
  55.  daylight savings  time. The dates of the start and end of DST are different in
  56.  various parts of the world. You indicate which  is  used  in your  zone by one
  57.  of the  following letters. If you are in the northern hemisphere then you must
  58.  specify the letter in  lower case, and if you  are in  the southern hemisphere
  59.  then you  must specify  it in  upper case.  The letters  and the  dates of the
  60.  start and end of DST are listed below: z
  61.  
  62.  
  63.  
  64.  
  65.  
  66. d or D: North America. Start first Sunday in April  and end  last Sunday in
  67.      October.
  68.  
  69. u or U: U.K. Start last Sunday in March and end last Sunday in October (the
  70.      actual dates are set by  act  of  parliament  each  year  but  this is
  71.      usually what they pick).
  72.  
  73. e  or  E:  Europe.  Start  last  Sunday  in  March  and  end last Sunday in
  74.      September.
  75.  
  76.  c or C: China(!). Start 12th April and end 12th September.
  77.  
  78.      If you specify upper case for the southern  hemisphere then  the start and
  79.  end of DST are reversed. In all cases the start and end occur at 2am.
  80.  
  81.      The best thing to do is to add a setenv command in your
  82.  s:startup-sequence file.  If you  use any  of my  other programs,  such as the
  83.  C_BBS packet program or the CHU program, then  you won't  have to  do anything
  84.  extra with  them because  they all  use   the same  routine to  check for your
  85.  timezone and adjust to UTC. I use the command:
  86.  
  87.   setenv TZ_CHU 6
  88.  
  89.  in my s:startup-sequence file because I am in the Central  Standard  Time zone
  90.  (6 hours  west of  Greenwich) and  we do  not   use daylight  savings time. In
  91.  Germany, which is one hour ahead  of  UTC and  uses European  daylight savings
  92.  time you would use:
  93.  
  94.      setenv TZ_CHU -1e
  95.  
  96.      I am  not sure  what DST  is used in Australia or New Zealand but if as an
  97.  example, they use the same DST as the U.K. (except  that they start in October
  98.  and end  in March) then an upper case 'U' is specified along with the timezone
  99.  correction.
  100.  
  101.  (The odd name "TZ_CHU" is derived from a program I wrote which  reads the time
  102.  from  Canadian  radio  station  CHU  and  sets  the amiga battery clock fairly
  103.  precisely).
  104.  
  105.      Once you have the name of the time server and  your local  timezone set up
  106.  properly  then  all  you  have  to  do,  apart from making sure that AmiTCP is
  107.  running, is to run the rdate program. It is only set up to run from the CLI.
  108.  
  109.  The program prints out how many seconds the current time on the  Amiga differs
  110.  from the  actual time reported by the timeserver and then it sets the clock to
  111.  the correct time. c